for (let i = 0; i < 10; i++) {
    console.log(i);
}

// for of
const users = ['Max', 'Apple', 'Joe'];
for (const user of users) {
    console.log(user);
}

// for in
const loggedInUser = {
    name: 'Max',
    age: 23,
    isAdmin: true
}

for (const key in loggedInUser) {
    console.log(key);
    console.log(loggedInUser[key]);
}

// while
let isFinished = false;
while (!isFinished) {
    isFinished = confirm('Do you want to continue?');
}